package com.rimi.util;

import com.rimi.bean.YqzcUser;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

/**
 * @author luka
 * @version V1.0
 * @date 2021 2021/7/12 0012 17:12
 */
public class GetTokenUtil {

    /**
     * 获取当前token的用户对象
     * @return
     */
    public static YqzcUser getUser(){
        Subject subject = SecurityUtils.getSubject();
        return (YqzcUser) subject.getPrincipal();
    }

}
